# Project:	MapReduce
# Author:	gong_libin
# Date:		2013_05_06

CC ?= g++
CFLAGS ?= -g -Wall

MR_ENV = $(shell pwd)/../..
MR_BIN ?= $(MR_ENV)/bin
MR_INC ?= $(MR_ENV)/inc
MR_SRC ?= $(MR_ENV)/src

MR_GLIB ?= /usr/lib
MR_GINC ?= /usr/include/MrInc

MYSQL_INC ?= /usr/include/mysql
MYSQL_LIB ?= /usr/lib/mysql

PGSQL_INC ?= /usr/include/pgsql
PGSQL_LIB ?= /usr/lib/pgsql

ORACL_INC ?= /usr/include/oracle
ORACL_LIB ?= /usr/lib/oracle

MR_OBJECTS =					\
	MrMysql.o				\
	MrPgsql.o				\
	MrOracl.o

all: $(MR_OBJECTS)

$(MR_OBJECTS): %.o: %.cpp
	$(CC) -c $(CFLAGS) -I$(MR_GINC) -I$(MR_INC) -I$(MYSQL_INC) -I$(PGSQL_INC) -I$(ORACL_INC) $< -o $@

clean:
	rm -rf $(MR_OBJECTS)
